sumOfSquares :: Int -> Int
sumOfSquares y = foldr (+) 0 [x*x | x<-[1..y]]

squareOfSums :: Int -> Int
squareOfSums y = x * x
	where x = foldr (+) 0 [1..y]

sumSquareDifference :: Int -> Int	
sumSquareDifference y = squareOfSums y - sumOfSquares y

euler_006 = sumSquareDifference 100